Optimal. Leaf size=29 \[ -\frac {\tanh ^{-1}(\cos (c+d x))}{a d}+\frac {\sec (c+d x)}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3254, 2702,
327, 213} \begin {gather*} \frac {\sec (c+d x)}{a d}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 327
Rule 2702
Rule 3254
Rubi steps
\begin {align*} \int \frac {\csc (c+d x)}{a-a \sin ^2(c+d x)} \, dx &=\frac {\int \csc (c+d x) \sec ^2(c+d x) \, dx}{a}\\ &=\frac {\text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a d}\\ &=\frac {\sec (c+d x)}{a d}+\frac {\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a d}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}+\frac {\sec (c+d x)}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 46, normalized size = 1.59 \begin {gather*} \frac {-\frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {\sec (c+d x)}{d}}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 39, normalized size = 1.34
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{2}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{2}+\frac {1}{\cos \left (d x +c \right )}}{d a}\) | \(39\) |
default | \(\frac {\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{2}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{2}+\frac {1}{\cos \left (d x +c \right )}}{d a}\) | \(39\) |
norman | \(-\frac {2}{a d \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}\) | \(42\) |
risch | \(\frac {2 \,{\mathrm e}^{i \left (d x +c \right )}}{d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a d}\) | \(71\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 46, normalized size = 1.59 \begin {gather*} -\frac {\frac {\log \left (\cos \left (d x + c\right ) + 1\right )}{a} - \frac {\log \left (\cos \left (d x + c\right ) - 1\right )}{a} - \frac {2}{a \cos \left (d x + c\right )}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 55, normalized size = 1.90 \begin {gather*} -\frac {\cos \left (d x + c\right ) \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - \cos \left (d x + c\right ) \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2}{2 \, a d \cos \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {\csc {\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} - 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 62 vs.
\(2 (29) = 58\).
time = 0.44, size = 62, normalized size = 2.14 \begin {gather*} \frac {\frac {\log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a} + \frac {4}{a {\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.08, size = 31, normalized size = 1.07 \begin {gather*} \frac {1}{a\,d\,\cos \left (c+d\,x\right )}-\frac {\mathrm {atanh}\left (\cos \left (c+d\,x\right )\right )}{a\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________